package com.yuanfengPlus.retailManage.retailback.controller;

import com.yuanfengPlus.retailManage.retailback.DTO.RetailBackDTO;
import com.yuanfengPlus.retailManage.retailback.DTO.RetailBackSelectDTO;
import com.yuanfengPlus.retailManage.retailback.service.IRetailBackService;
import com.yuanfengPlus.retailManage.retailback.service.impl.IRetailBackServiceImpl;
import com.yuanfengPlus.utils.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "零售出库单接口")
public class RetailBackController {
    @Autowired
    private IRetailBackServiceImpl retailBackService;
    /**
     *  零售退货单落库
     * @param retailBackDTO
     * @return
     */
    @PostMapping("/retailBack")
    public Result insertRetailBack(RetailBackDTO retailBackDTO) {
        return retailBackService.insertRetailBack(retailBackDTO);
    }
    /**
     * 查询所有退货单
     * @param retailBackSelectDTO
     * @return
     */
    @PostMapping("/queryRetailBack")
    public Result queryRetailBack(RetailBackSelectDTO retailBackSelectDTO) {
        return retailBackService.queryRetailBack(retailBackSelectDTO);
    }

}